home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
pdrd2.zip
/
RD.ZIP
/
RD_DEMO6.PRG
< prev
next >
Wrap
Text File
|
1993-01-11
|
1KB
|
48 lines
/*
RD_DEMO6.PRG
This demonstrates the use of:
1. ADr_again() - resurrects an exited Read.
2. The return value of ADread().
*/
#include "read.ch"
//---------
func main()
local getlist[0]
local cShort := "Short string"
local cLong := "This is a very long string. It is '@S PICTUREd'. This is the last of three sentences."
local nT := 10, nL := 10, nB := 13, nR := 50
local cColor := setcolor( if( iscolor(), "W+/BG, GR+/R,,, N/R", nil ) )
local aScn, aScn2, aReadRetval
#define DO_NOT_KILL .f.
#define READ_ENGINE aReadRetval[1]
cls
aScn = ADbox( nT, nL, nB, nR )
aScn2 = ADmessage( { "This example will demonstrate how to reactivate an exited Read"},;
20,, .f., .f. )
@nT+1, nL+2 say "Short String" adget cShort
@nT+2, nL+2 say "Long String " adget cLong picture "@S24"
aReadRetval = ADread( getlist,,, DO_NOT_KILL )
ADrestscn( aScn2 )
aScn = ADrestscn( aScn )
ADmessage( {;
"You have exited the Read. The Read engine, however, continues to 'live'.",;
"You may re-activate it any time you want to. In this demo, we will",;
"do that as soon as you press any key. The reactivated Read, by default,",;
"will consist of empty Gets, and Get #1 will have the initial focus. ";
},18 )
aScn = ADrestscn( aScn )
ADr_again( READ_ENGINE )
ADrestscn( aScn )
setcolor( cColor )
return nil